<?php
/**
 * Copyright 2011  SURFfoundation
 * 
 * This file is part of ESCAPE.
 * 
 * ESCAPE is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * ESCAPE is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with ESCAPE.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * For more information:
 * http://escapesurf.wordpress.com/
 * http://www.surffoundation.nl/
 * 
 * Contact: d.vierkant@utwente.nl
 * 
 * @license http://www.gnu.org/licenses/gpl.html GNU GPLv3
 */
?>
<?php $this->displayHeader(); ?>

<?php
$sourceProperty = $this->requestAttributes['sourceProperty'];
$targetProperty = $this->requestAttributes['targetProperty'];
$rdfType = $this->requestAttributes['rdfType'];
$includeSubTypes = $this->requestAttributes['includeSubTypes'];
$dryRun = $this->requestAttributes['dryRun'];
?>

<p>
Please enter the source property (RDF predicate), target property and the RDF type to which the changes should apply.
Leave the type blank if you want to apply the change to objects of all types.
</p>

<form method="post" action="/setup/ReplaceProperty">

<table>

<tr>
<td>
<label for="sourceProperty">Source property:</label>
</td>
<td>
<input type="text" id="sourceProperty" name="sourceProperty" size="50" value="<?php print htmlspecialchars($sourceProperty); ?>" />
</td>
</tr>

<tr>
<td>
<label for="targetProperty">Target property:</label>
</td>
<td>
<input type="text" id="targetProperty" name="targetProperty" size="50" value="<?php print htmlspecialchars($targetProperty); ?>" />
</td>
</tr>

<tr>
<td>
<label for="rdfType">RDF type:</label>
</td>
<td>
<input type="text" id="rdfType" name="rdfType" size="50" value="<?php print htmlspecialchars($rdfType); ?>" />
</td>
</tr>

<tr>
<td>
<label for="includeSubTypes">Include sub-types:</label>
</td>
<td>
<input type="checkbox" id="includeSubTypes" name="includeSubTypes" value="1"<?php if($includeSubTypes) { ?> checked="checked"<?php } ?> />
</td>
</tr>

<tr>
<td>
<label for="dryRun">Dry run:</label>
</td>
<td>
<input type="checkbox" id="dryRun" name="dryRun" value="1"<?php if($dryRun) { ?> checked="checked"<?php } ?> />
</td>
</tr>

</table>

<input type="submit" value="Replace" />

</form>

<p>
<em>This operation will not update the schema. Please make sure to update the schema files, if necessary.</em>
</p>

<?php $this->displayFooter(); ?>